package com.neusoft.rental.service.impl;

import com.neusoft.rental.mapper.ManagerMapper;
import com.neusoft.rental.po.Manager;
import com.neusoft.rental.service.ManagerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ManagerServiceImpl implements ManagerService {

    @Autowired
    private ManagerMapper managerMapper;

    //管理员登录，返回的是Mapper查询中的rank字段，rank为1代表院级管理，2代表校级管理，前端根据返回值进入对应后台页面
    @Override
    public int managerLogin(String name, String passwd) {
        return managerMapper.managerLogin(name,passwd).getRank();
    }
}
